Copyright: Copyright ® 1993 - 1997 G.Plowman


API Directory

The following lists all of the API functions which can be called from your applications to use the LLLIB Licensing Library.

Setting up the library

SetLicenseFile	Set the license file name

SetLibraryLicense	Set the library license

Writing license files

WriteDefaultLicense	Write a default Unregistered or Limited license

WriteLicense	Write a license number to the license file

WriteLicenseUser	Write the user's name/company to the license file

License Checking/Validation

CheckLicenseNo	Check the license to see if it is valid

CalcLicenseNo	Calculate a license number

ValidateLicenseNo	Validate a license number

Getting License Information

GetLicense	Get the license number from the license file

GetLicenseOption	Get the license option from the license file

GetLicenseUser	Get the user's name from the license file

GetLicenseCompany	Get the user's company name from the license file

GetLicenseErrorMsg	Get the textual message relating to an error code

Handling License Limiting Features

IsLicenseLimited	Determine if the license is limiting the software

GetExpiry	Determine when a license expires

IncreaseLicenseRuns	Increase the number of time a program has been run

GetLicenseRuns	Get the number of runs left

GetLicenseUsers	Get the number of concurrent users allowed

IncreaseLicenseUsers	Increase the number of users using the software

DecreaseLicenseUsers	Decrease the number of users using the software

GetFreeLicenseUsers	Get the number of free user licenses

GetUsedLicenseUsers	Get the number of users currently using the software


About GPP Software

GPP Software first started developing software in 1992 with the release of its 'HelpBuilder' program.

HelpBuilder is a development tool for creating Windows help files and it continues to be one of our main products, having been continually upgraded since its first release. We use HelpBuilder to create help files for all of our products.

Our 'Setup Builder' product was released in early 1993. Setup Builder is a tool for creating professional-looking Windows-hosted installation procedures for installing software. Setup Builder is our main product, having sold large numbers of copies worldwide. Setup Builder has now been upgraded to operate under Windows 3.1, Windows 95 and Windows NT. We use Setup Builder to create installation procedures for all of our software.

'Library Manager' was released in late 1993. Library Manager was a source code and document version control system. It is currently no longer available while a major upgrade progresses.

In July 1995, GPP Software moved our main office from the Uk to Sydney, Australia. This now allows us to provide services for customers in both England and Australia. Our Uk office provides order handling services and our Australian office performs the distribution of our software and all software development. At the same time we also started offering our software on the Internet via our home page (http://www.ozemail.com.au/~gplowman). Previously, we had only previously  offered our software via Compuserve.

We released the SpellChecker addon for HelpBuilder in early 1995, followed by a special version of the spell checker product for use by developers to build into their own programs.

Our licensing library LLLIB became available in June 1997. This provided developers with a toolkit to build licensing functionality into their software which would control how users used their software. The library provides for unregistered, time limited, run limited and fully registered licenses with the ability to control the number of concurrent users in a network environment.

Check 2000 became available in June 1997. This product provides developers with a utility for analysing program source code for potential year 2000 date compliance problems.

GPP Software has sold its software products to many well known major corporates worldwide.

Most of our development is performed using Microsoft Visual C++ version 1.00 for 16-bit applications and Microsoft Visual C++ version 4.2 for 32-bit applications. We also do development in Visual Basic version 3.0. Our development platforms are Windows 3.1, Windows 95 and Windows NT.

GPP Software can do software development contracts for small to medium-sized applications. We also do customer training in our own products.

For any further information on our products and software development services, please contact GPP Software.


About Dialog

The About dialog displays copyright and version information about this version of the application.


CalcLicenseNo function

Definition

void CalcLicenseNo(char, long, LPCSTR, int, long, int, LPSTR);

Purpose

The CalcLicenseNo function is used to calculate a license number, given some basic parameters.

Parameters

char	License option ('U', 'T', 'L' or 'R')

long	Modulus to use (5 - 8)

LPCSTR	Product code (3 characters, numeric or alphabetic, eg "001")

int	Number of concurrent users allowed by the license

long	Registration number (typically increments for each registration)

int	Period (number of days if option 'U' or 'T' or number of runs if option 'L')

LPSTR	Buffer to store the result

Returns

This function does not have a return value - it modifies the last parameter buffer.

Comments

CalcLicenseNo is normally only used by programs which allow vendors to allocate license numbers to clients. It provides the

mechanism by which a license number can be worked out.

This function is used by the License Calculator program supplied with the LLLIB Licensing Library. It is recommended that vendors do

not provide functionality in their software which uses this function and would allow a client to work out their own license number.


CheckLicenseNo function

Definition

int CheckLicenseNo(LPCSTR, LPCSTR, long);

Purpose

The CheckLicenseNo function is used to validate a license number in a license file.

Parameters

LPCSTR	String of license options which are valid (eg "UTR")

LPCSTR	Product code (3 characters, numeric or alphabetic, eg "001")

long	Expected license number modulus

Returns

int	0 for success, any other value is an error code.

Comments

CheckLicenseNo is used by all applications at startup to validate a license number. The function performs a number of checks to ensure the integrity of the license number file:

The file date with an internally coded value to make sure that the file has not been changed.

A check is done to make sure that the PC date hasn't been changed to bypass time limiting licenses.

A modulus check is performed to ensure that the number conforms with the check digit modulus used to create the license number.

A check is done to ensure that the license number is using the expected modulus.

A product number check is done to ensure that the license is correct for the product so that users can't swap licenses between products.

Time checks are done to determine the expiry of time-limited licenses.

Run checks are done to determine the expiry of run-limited licenses.

If the license file has been tampered with in any way or the license has expired, the CheckLicenseNo function invalidates the license and disables the software from running. The software cannot be run again until a valid license number is entered via the License Administrator program.

This function is demonstrated in all of the sample programs.

See Also

Error Codes and Messages


Contacting GPP Software

GPP Software can be contacted at the following addresses:

PO Box 1124, Manly 2095, NSW, Australia

or

'Fiddlers Rest', Gaveston Hall Drive, Nuthurst, Horsham, West Sussex, RH13 6RG, England

All post sent to the Uk address will be forwarded to the Australian address, so please allow for a slight delay.

GPP Software can also be contacted on:

Compuserve ID: 100105,536

Internet: 100105.536@compuserve.com

Internet: gplowman@ozemail.com.au

Internet Home Page/Information/Download Service:

http://www.ozemail.com.au/~gplowman


Contents Page

Contents for LLLIB Licensing Library help

The GPP Software LLLIB Licensing Library is a tool for building licensing control functionality into your applications.

To learn how to use Help, press the F1 key.

General Information

      	What is the LLLIB Licensing Library ?

Errors and Troubleshooting/Technical Information

      	API Directory

      	Error Codes and Messages

      	License Calculator Program

      	License Administrator Program

      	Examples of how to the LLLIB Licensing Library

      	Versions of the LLLIB Licensing Library

      	Distributing Applications Which use the LLLIB Licensing Library

Getting Started/Samples

      	Sample Files

Other Information

      	Other products available

      	What is Shareware ? - Description and Disclaimer

      	Payment for and Registration of Software

      	Software Price List

      	Contacting GPP Software

      	About GPP Software

      	Application Limitations & Limitations on use

      	Help File Copyright


Copyright
This Windows Help file was written by Graham Plowman

using Help Builder Version 2.00.000 and refers to:

LLLIB Licensing Library Version 1.00.000 / 21/06/97

Copyright © 1993 - 1997 G.Plowman


DecreaseLicenseUsers function

Definition

void DecreaseLicenseUsers();

Purpose

The DecreaseLicenseUsers function is used to reduce the count in the license file of the number of users currently using the software concurrently.

Parameters

None

Returns

None

Comments

DecreaseLicenseUsers is normally used in the termination/logoff procedure of an application. When called, the function reduces the concurrent user count in the license file and therefore frees a license to be used by another user.

Typically, this function is used in conjunction with the IncreaseLicenseUsers function to control licenses which allow multiple users to use a piece of software concurrently in a network environment. Often, the license may be purchased on the basis of the number of concurrent users allowed.

This function is demonstrated in SAMPLE2 and SAMPLE4 of the sample programs.

See Also

IncreaseLicenseUsers


Distributing Applications
Distributing Applications Which use the LLLIB Licensing Library

Before applications using the LLLIB Licensing Library can be distributed, you must have purchased a copy of the LLLIB Licensing Library software.

You are not allowed to distribute the software with unlicensed versions of the LLLIB Licensing Library.

Please see the Software Price List for information on purchasing your copy of the LLLIB Licensing Library.

Build Methods

The distribution and setup of applications which have been built to use the LLLIB Licensing Library Library depends on how the library has been integrated with the application. There are two ways in which the LLLIB Licensing Library can be built into applications:

1) As a Dynamic Link Library

This method requires that you distribute the appropriate LLLIB Dynamic Link Library with your application setup procedure. The DLLs may be:

LLLIB16D.DLL	(16-bit DLL)

LLLIB32D.DLL	(32-bit DLL)

The Dynamic Link Libraries can be placed in your application's installation directory or the Windows System directory. If the latter is used, you should use the features of your installer product to register the DLL(s) as a shared file and perform version checking so that new versions of the DLL are not overwritten with older versions by different installs. There is no need for any complex OLE registration as the library is not an OLE product.

The DLL approach applies to any development tool which allows the use of external Dynamic Link Libraries such as Visual C++, Borland C++, Delphi, Visual Basic and Visual Objects for example.

The sample applications supplied with the LLLIB Licensing Library use the LLLIB Licensing Library in it's DLL form.

2) As a Statically Linked Module

This approach only applies to C/C++ applications or development tools/compilers which perform pure code static linking.

The LLLIB Licensing Library can be statically linked to you application. There is no need to distribute any DLLs or executables other than your application executable because it will contain the LLLIB Licensing Library code required.

The License Calculator and License Administrator applications supplied with the LLLIB Licensing Library use the LLLIB Licensing Library in it's statically linked form.

Static linking has the advantage that the LLLIB Licensing Library does not fail if the DLL is missing.

Common tasks for all installations, regardless of the approach used above

Setting up a Default License File

For all installations which use the LLLIB Licensing Library, the installation procedure should set up a basic licensing file. The location of the licensing file is your choice, however, it is recommended that the file is placed in the same directory as the application executable. This means that if the application is run from a network, the sharing of concurrent licenses will operate correctly because all users will reference the same license file. Alternatively, the location can be specified by a .INI file or registry setting although this method is not recommended because it can allow users to move license files to get around the concurrent user check in network licenses.

The installation procedure for your software should use the following LLLIB Licensing Library API calls to set up the basic license file. This example is demonstrated using the script language supported by the GPP Software Setup Builder Installer product which we recommend for use in installing LLLIB Licensing Library applications because it has the necessary API functionality built into the script language:

// Write a default license

WriteDefaultLicense("%InstallPath%LICENSE.DAT", "U", 8, "001", 1, 30)

This creates a default 'Unregistered' restricted license for product code '001', 1 user and a 30 day evaluation period.

The WriteDefaultLicense file API function will not recreate a license file if the file already exists. Therefore, if the user re-installs your software, the license period will not be reset to give another 30 day period.

The creation of license files should only be done by an installation procedure, not by the application itself, otherwise a potential licensing security 'loophole' can be created.

Applying the User Name/Company to the License File

When software is installed, it is common for the user to be requested to enter their name and company for licensing purposes.

With the LLLIB Licensing Library, this information can be written to the license file.

The following shows an example of script (from Setup Builder) which will request the user's name and company and write it to the licensing file:

// Enter the licensing information

SET %Message1% = "Please enter the following licensing information for the %Application% software:"

DialogBox("License")

IF %ERROR% == IDCANCEL GOTO :EXIT

WriteLicenseUser("%InstallPath%LICENSE.DAT", "%EF_1%", "%EF_2%")

Once this has been done, whenever the LLLIB Licensing Library API functions are called from your application to return the user and company, they will return those entries made at install time.

Supplying the License Administrator program

The License Administrator program should be distributed as part of your installation procedure. It is recommended that the program is placed in the same directory as your application executable, but it can in fact be located anywhere.

The License Administrator program takes a single parameter: The filename of the license file.

The installation procedure for your software must create an icon for the License Administrator (otherwise your customer won't be able to enter a license number) and the icon must have the name of the license file as a parameter. Example Setup Builder script:

MakeIcon("License Administrator", "%InstallPath%LLADM16.EXE", "%InstallPath%LICENSE.DAT")

There is no distribution fee for distributing the License Administrator with your application.

The License Calculator program

This is supplied with the %THEAPP$ for your use to calculate license numbers to give your customers when they purchase your software.

Under no circumstances must the License Calculator program or any of this LLLIB Licensing Library supporting documentation be distributed to your customers otherwise they will be able to create their own license numbers, defeating the whole objective of using the LLLIB Licensing Library.

.INI File and Registry entries

The LLLIB Licensing Library has no requirements of .INI files or the Windows Registry because it makes no use of either.

Compatibility

Please note that the license files used by the 16 and 32-bit versions of the LLLIB Licensing Library are currently not compatible. This means that separate license files are required for 16 and 32-bit applications - they cannot share the same license file.

De-Installing your application

The application de-install procedure for your application should remove all of the files that it installed including any license files that have been subsequently created. Files (eg DLLs) placed the the Windows System directory should only be removed subject to file share counts.


Error codes and messages

Following is a list of the error codes and messages which can be returned from the LLLIB Licensing Library.

The error codes are defined in the support files ERRORS.H and LLLIB.BAS.

ER_OK

The operation was successful.

ER_LICENSEFILEMISSING: The license file '..' could not be found

An attempt has been made to perform a license file operation but the license file shown could not be found.

ER_LICENSEEXPIRED: License has expired

The license number has expired.

ER_LICENSEUNRECFILE: Unrecognised license file

The LLLIB Licensing Library does not recognise the license file as a valid license file.

ER_LICENSEUNRECVER: Unrecognised license file version

The LLLIB Licensing Library does not recognise the version of the license file as a valid license file. The error occurs if 'new' format files are copied under older versions of the LLLIB Licensing Library. Newer versions of the library are backwards compatible.

ER_LICENSEUNRECLICENSENOVER: Unrecognised license number version

License numbers contain a version number for the format. The LLLIB Licensing Library does not recognise the license number version as a valid version. The error occurs if 'new' format numbers are entered into older versions of the LLLIB Licensing Library.

Newer versions of the library are backwards compatible.

ER_LICENSEINVALIDOPTION: An invalid license number option specified

An invalid license number option type was specified. It must be 'U', 'L', 'T' or 'R' for the license type.

ER_LICENSEINVALIDPRODCODE: An invalid product code specified

When validating a license, this error means that the product code specified in the license number does not match that which the software was expecting. This stops customers swapping licenses between different products.

ER_LICENSEINVALID: An invalid license number

The license number specified was simply invalid.

ER_LICENSECREATEFAIL: Failed to create the license file '..'

The library failed to create the license file, either because the disk is write-protected, the file name is invalid or disk corruption has occured.

ER_EXPIRESONDATE: The license expires on a date

This message is only returned by the GetExpiry API function. The error code is an information code rather than an error and means that the license expires on a date.

ER_EXPIRESONRUNS: The license expires after x runs

This message is only returned by the GetExpiry API function. The error code is an information code rather than an error and means that the license expires after a number of runs.

ER_LICENSENOUSERSLEFT: There are no more user licenses available - the maximum number of users

allowed to use this software concurrently has been reached

When using the library to manage a shared network license of concurrent users, this error code means that an attempt has been made to increase the current user count but the count is already at the limit allowed by the license. No more users can use the software at the current time. A user must stop using the software to reduce the count so that another user can use the software.

ER_LICENSETAMPERED: The license file has been tampered with

The library has detected that the license file has been tampered with and has therefore disabled the license altogether. The license can only be released if a valid license number is entered.

ER_LICENSEINVALIDMODULUS: An invalid license number modulus was specified

License numbers conform to a modulus check. This message means that when checking the license number it does not conform to the license modulus.

ER_NOTRUNLIMITED: The license is not a run limited license - cannot change number of runs

This error occurs when an attempt is made to change the number of runs an application has made when the license number is not a run-limited license. You cannot change the number of runs for a license which is not of type 'L'.

ER_FILEALREADYEXISTS: The license file '..' already exists

This error code is returned when an attempt is made to create a default license file when the license file already exists. The license file cannot be overwritten by recreating it with another default license file.


Examples of using the Library
Examples of how to the LLLIB Licensing Library

This page presents a number of different scenarios of where a developer may require a license to be implemented in their

software and suggests the appropriate LLLIB Licensing Library licensing strategy to use for that situation.

Case 1: Shareware Author distributing standalone software - time limited

Shareware Authors generally wish to distribute their software freely, allow anyone to install it, but control how long it runs for and limit some of the features within the software.

In this scenario, the Unregistered license would be used when the software is installed. This type of license can allow a piece of software to run for a certain period of time (up to 999 days) and then expire. API functions also allow this type of license to be detected so that certain features of the software can be either disabled or limited in functionality.

When a customer purchases a copy of the software, the Shareware Author would use the License Calculator program to evaluate a Registered license number which would then be given to the customer to enter via the License Administrator program which the Shareware Author should have supplied with their software.

Case 2: Shareware Author distributing standalone software - run limited

Sometimes, Shareware Authors wish to limit their software by controlling the number of time it is run.

To do this, the LLLIB Licensing Library provides the run-Limited license which would be used when the software is installed. Like the Unregistered license, the run Limited license can be detected by API functions so that certain features of the software can be either disabled or limited in functionality.

When a customer purchases a copy of the software, the Shareware Author would use the License Calculator program to evaluate a Registered license number which would then be given to the customer to enter via the License Administrator program which the Shareware Author should have supplied with their software.

Case 3: Software house 'lending' a copy of software for an evaluation period

Software houses sometimes lend a fully functional version of their software to a potential customer for the purposes of evaluation. Generally, the evaluation is for a period of 1 month or 30 days. The software is not limited in any way, except that it will stop running at the end of the evaluation period.

To support this scenario, the LLLIB Licensing Library provides the Temporary license. Temporary licenses can be set to be valid

for a certain period of time after which the license expires.

If the customer purchases a copy of the software, the software house would use the License Calculator program to evaluate a Registered license number which would then be given to the customer to enter via the License Administrator program which the Shareware Author should have supplied with their software.

New license numbers can be entered at any time, overwriting any type of previous license number.

Case 4: Temporary license until payment arrives

Some companies operate a licensing system whereby a temporary license is given to a customer to keep them going for a few days until payment for a full license arrives.

This approach is a variation on case (3) above. The vendor simply supplies a 3 or 4 day Temporary license to the customer.

When payment arrives, the vendor gives the customer a fully Registered license number.

GPP Software have operated this type of licensing strategy and found it not to be successful. We would therefore not recommend it to our customers, however, the LLLIB Licensing Library does provide for this approach if it is required.

Case 5: Time limited license

Some software is licensed on a time basis, for example, a yearly license. To cater for this type of licensing, the vendor would use the Temporary license offered by the LLLIB Licensing Library. The period specified would typically be 365 days. The Temporary license does not limit software in any way, but it does expire after the allocated time period. Once the license expires, the customer can purchase another 365 day Temporary license, enter it via the License Administrator and the process can repeat again. The LLLIB Licensing Library does allow Temporary licenses to be entered consecutively.

Case 6: Software house marketing network software

Network software is often licensed on the basis of the number of concurrent users. While the LLLIB Licensing Library does not offer

a specific network license, all of the license types offered support networked environments by allowing the number of concurrent users to be specified and controlled. It is possible to have Unregistered multi-user licenses and run-Limited licenses for example.

Therefore, to provide for network multi-user control, the vendor should simply select the required licensing strategy and specify that more than one user is allowed in the license number.

The License Administrator program should be supplied to the customer so that they can enter a license number when they purchase a copy of the software.

Networked licensing is demonstrated in the SAMPLE2 and SAMPLE4 sample programs.

All of the above licensing strategies can support networked software whereby the number of concurrent users is also controlled.

Please see the sample programs for demonstrations on how this can be done.

GPP Software recommends that if any kind of run or time limiting is used in a license that the software provides a constant display, for example, on application startup in a 'splash panel' or in About dialogs to inform the user when the license will expire. The LLLIB Licensing Library provides API functions to determine expiry dates. It is not good practice for software to stop working without warning.


GetExpiry function

Definition

int GetExpiry(LPINT, LPINT, LPINT, LPINT);

Purpose

The GetExpiry function is used to determine when a license expires.

Parameters

LPINT	Long pointer to location to store day of expiry

LPINT	Long pointer to location to store month of expiry

LPINT	Long pointer to location to store year of expiry

LPINT	Long pointer to location to store number of runs left

Returns

int	ER_OK (Never)

    	ER_EXPIRESONDATE (Expires on a date)

    	ER_EXPIRESONRUNS (Expires after a number of runs)

Comments

The error return may also indicate an error if the license file could not be read, but normally, only the above values will be returned.

GetExpiry is normally used to determine when a license expires so that a display can be given to the user. This function is

demonstrated in the About dialog of the sample programs.


GetFreeLicenseUsers function

Definition

int GetFreeLicenseUsers();

Purpose

Obtains the number of free concurrent user licenses.

Parameters

None

Returns

int	The number of free licenses

Comments

GetFreeLicenseUsers is normally used in network applications where the license is being used to control the number of concurrent users using a piece of software.

The function returns the number of user licenses which are free to be used.

This function is demonstrated in the About dialog of the sample programs.


GetLicense function

Definition

int GetLicense(LPSTR);

Purpose

Obtains the license number.

Parameters

LPSTR	Buffer to store the license number

Returns

int	0 for success, any other value indicates an error

Comments

GetLicense is normally used to obtain the license number for display purposes in dialogs.

This function is demonstrated in the About dialog of the sample programs.


GetLicenseCompany function

Definition

int GetLicenseCompany(LPSTR);

Purpose

Obtains the company name in the license.

Parameters

LPSTR	Buffer to store the company name

Returns

int	0 for success, any other value indicates an error

Comments

GetLicenseComapny is normally used to obtain the company name from the license file for display purposes in dialogs.

This function is demonstrated in the About dialog of the sample programs.


GetLicenseErrorMsg function

Definition

void GetLicenseErrorMsg(int, LPSTR);

Purpose

Obtains the textual explanation of an error code.

Parameters

int	Error code returned from any of the LLLIB Licensing Library API functions

LPSTR	Buffer to store the message obtained

Returns

None - the second parameter buffer is modified.

Comments

Most of the LLLIB Licensing Library functions return an error code. This function can be called to obtain a textual explanation of the

error code for the purposes of displaying in a message box.

This function is demonstrated in all of the sample programs.


GetLicenseOption function

Definition

int GetLicenseOption(LPSTR);

Purpose

Obtains the license option code from the license.

Parameters

LPSTR	Buffer to store the result (minimum of two bytes long).

Returns

int	0 for success, any other value is an error code.

Comments

The GetLicenseOption function obtains the option type from the license file. The option type specifies the type of license.

The option will be 'U' for an unregistered license, 'L' for a run limited license, 'T' for a temporary time limited license or 'R' for a fully registered license.

The license option can be used as a value to control limiting features which you may decide to build into an application, based on the license type.

This function is demonstrated in the About dialog of all of the sample programs.


GetLicenseRuns function

Definition

int GetLicenseRuns();

Purpose

Obtains the number of runs allowed by the license which may still be used.

Parameters

None

Returns

int	The number of runs still allowed.

Comments

GetLicenseRuns is normally used to obtain the number of runs left from the license file for display purposes in dialogs.

This function is demonstrated in the About dialog of the sample programs.

See Also

IncreaseLicenseRuns


GetLicenseUser function

Definition

int GetLicenseUser(LPSTR);

Purpose

Obtains the user name in the license.

Parameters

LPSTR	Buffer to store the user name

Returns

int	0 for success, any other value indicates an error

Comments

GetLicenseUser is normally used to obtain the user name from the license file for display purposes in dialogs.

This function is demonstrated in the About dialog of the sample programs.


GetLicenseUsers function

Definition

int GetLicenseUsers();

Purpose

Obtains the maximum number of concurrent users allowed by the license.

Parameters

None

Returns

int	The number of users allowed.

Comments

GetLicenseUsers is normally used to obtain the number of users allowed from the license file for display purposes in dialogs.

This function is demonstrated in the About dialog of the sample programs.

See Also

IncreaseLicenseUsers, DecreaseLicenseUsers


GetUsedLicenseUsers function

Definition

int GetUsedLicenseUsers();

Purpose

Obtains the number of concurrent users currently using the software.

Parameters

None

Returns

int	The number of users currently using the software.

Comments

GetUsedLicenseUsers is normally used to obtain the number of concurrent users current using a piece of software from the license file for display purposes in dialogs.

See Also

IncreaseLicenseUsers, DecreaseLicenseUsers, GetLicenseUsers


IncreaseLicenseRuns function

Definition

int IncreaseLicenseRuns();

Purpose

The IncreaseLicenseRuns function is used to increase the run count in the license file of the number of runs a piece of software is allowed to run.

Parameters

None

Returns

int	0 for success, any other value is an error code (normally ER_LICENSEEXPIRED or ER_NOTRUNLIMITED).

Comments

The error return may indicate an error if the license file could not be read, but normally, an error return will only occur when the number of runs allowed by the license has been reached. When this occurs, the software must not be allowed to run again and for this purpose, the LLLIB Licensing Library disables the license so that the software cannot be run again until a valid license number is

entered via the License Administrator program.

IncreaseLicenseRuns is normally used in the startup procedure of an application. When called, the function increases the run count in the license file. Each time the application is run, the run count is increased until eventually, it reaches the limit specified by the license.

This allows a piece of software to be only run a certain number of times.

This function is demonstrated in SAMPLE3 and SAMPLE4 of the sample programs.

See Also

GetLicenseRuns


IncreaseLicenseUsers function

Definition

int IncreaseLicenseUsers();

Purpose

The IncreaseLicenseUsers function is used to increase the count in the license file of the number of users currently using the software concurrently.

Parameters

None

Returns

int	0 for success, any other value is an error code (normally ER_LICENSENOUSERSLEFT).

Comments

The error return may indicate an error if the license file could not be read, but normally, an error return will only occur when an attempt to increase the count beyond the number of users allowed is made. The count will not be allowed to exceed the number of users allowed by the license.

IncreaseLicenseUsers is normally used in the startup procedure of an application. When called, the function increases the concurrent user count in the license file.

Typically, this function is used in conjunction with the DecreaseLicenseUsers function to control licenses which allow multiple users to use a piece of software concurrently in a network environment. Often, the license may be purchased on the basis of the number of concurrent users allowed.

This function is demonstrated in SAMPLE2 and SAMPLE4 of the sample programs.

See Also

DecreaseLicenseUsers


Integrity Check
Integrity Checking

This application has an automatic self-checking feature to advise of corruption to the executable file.

The main purpose of this is to enable the program to identify whether it has been interfered with, either by a binary file editor or a computer virus.

Note that attempts to change icons and messages etc using products such as AppStudio or Resource Workshop will render this application unusable since they will cause a failure of the check.

If the application executable is corrupted in any way, the following message will appear:

Integrity Check Violation Error: Integrity has been violated!

If this message does appear, you should re-install this application after checking the reason for it occuring.

Note that all GPP Software products are Virus Checked before it is distributed.

Other integrity-related messages are possible. If you need assistance, please contact GPP Software.


IsLicenseLimited function

Definition

BOOL IsLicenseLimited();

Purpose

Determines whether the license is a limiting license which should limit the features of a piece of software.

Parameters

None

Returns

BOOL	TRUE	The license is a limiting license

FALSE	The license is not a limiting license

Comments

Limiting licenses are licenses with option types 'U' and 'L'.

By using this function, the developer can write their software to implement limiting features for unregistered and run limited software.


License Administrator Program

The License Administrator Program is used by clients to enter license numbers when they are given to them by vendors.

The License Administrator program is supplied in two versions:

LLADM16.EXE - 16-bit Windows 3.1 version

LLADM32.EXE - 32-bit Windows 95/NT version

The 16-bit version should be supplied with 16-bit applications and similarly, the 32-bit version with 32-bit applications. The 16-bit

version will operate with 16-bit applications running under Windows 95/NT. The main difference between the two versions is that the

32-bit version supports long file names.

It is suggested that your software's installation procedure installs an icon for the License Administrator program.

GPP Software recommend the use of 'Setup Builder' because this installer offers the required functionality to create icons.

The License Administrator program requires a parameter file name to be supplied when it is run, so this should also be set in the icon.

The parameter file name must be the fully qualified name of a license file, that is, the name should include drive and path

specifications. The file need not already exist and it can be on a local drive or on a network as required. The file must also be

accessible to the application that it going to use it.

When the License Administrator program is run, it presents a dialog with a single field. The user should enter a license number in the

field and press the Ok button to save the number to the license file.

The license number will be validated and it must comply with a number of rules which are in-built to the LLLIB Licensing Library, so you

cannot just enter any-old number.

Press the Cancel button to exit the License Administrator program without entering a license number.

Press About to view the version and copyright information about this version of the License Administrator program.


License Calculator Program

The License Calculator Program is used by vendors to calculate license numbers to be given to customers.

This program should be retained by vendors and not be given to customers.

The License Calculator program is a standard .EXE file and had no special installation requirements. The program doesn't even require a .INI file, so it can simply be copied and run.

When run, the License Administrator program displays a dialog containing a number of fields which relate to a license number.

Following is a description of all those fields:

License Option

This dropdown list enables the vendor to select the type of license required.

Modulus

This is the check-digit modulus to use for creating license numbers. By default, this is 8.

Product Code

This field expects a 3-digit value. The value can be numeric or alphabetic characters. What these characters are is at the

discretion of the vendor. Typically, the field would be a 3-digit product number or 3-character product name.

This field is required.

Number of Users

For networked licenses, this field specifies the number of concurrent users that the license will allow when your software is run in a network environment. The number of users typically depends on the number of users the customer has paid for.

If your software is not being used in a network environment, this field should specify '1' for one user.

The maximum number of users allowed is 999.

This field is required.

Number of Runs/Days

Depending on the License Option chosen, this field either specifies the number of runs that an application will be allowed or the

number of days for which it will be allowed to run.

The maximum period allowed is 999 runs or 999 days.

This field is required.

Registration Number

This field is a numeric field and specifies the number of the license. Typically, this starts at 1 is incremented by the vendor for every copy of the software sold.

The registration number can be from 1 to 999999.

Result: License Number

This field contains the result of the calculation: the actual license number to be given to the customer.

Press the Calculate button to calculate the new license number and see it appear in the result field.

Press Cancel to exit the License Calculator program.

Press About to view the version and copyright information about this version of the License Calculator program.


Limitations on Use
Application Limitations

The LLLIB Licensing Library currently has the following limitations, which may be modified in future releases:

Four licensing types.

The maximum number of concurrent network users allowed is 999.

The maximum number of days allowed for a time limited license is 999.

Because the library uses a file to maintain a license number, in network environments, a drive mapping is required to enable the license file to be read. The licensing system does not operate using the network protocol. This has the advantage that the LLLIB Licensing Library can be used on any network.

The license files created by the 16 and 32-bit versions of the library are currently not compatible. This means that 16 and 32-bit applications cannot share the same license file.

Limitations on Use

Users of the Shareware Edition must not distribute the LLLIB Licensing Library software as part of an application, however users of the

Professional Edition may do so freely.

There is no fee payable for distributing large numbers of copies of the LLLIB Licensing Library as part of a larger application,

however, GPP Software does ask that if you use the LLLIB Licensing Library for controlling licensing of your software that you mention

the product and GPP Software's contact details in your supporting documentation or help files.


Other Products Available
Products Available from GPP Software

The following products are available from GPP Software:

HelpBuilder

HelpBuilder is a Microsoft Windows 3.1 application for creating and maintaining Windows Help files and is designed for developers wishing to create Windows Help files to distribute with their products and for anyone wishing to create standalone Windows Help files.

This help file was created using HelpBuilder.

HelpBuilder is not an 'add-on' to a commercially available word processor, rather, a Multiple Document Interface (MDI) application integrated with the Microsoft HC31.EXE help compiler (or equivalent compatible eg HCP.EXE)(HelpBuilder is configurable). Since it is likely that anyone using this product is likely to be an applications developer using Visual Basic, Microsoft C/C++ or Borland C++ they will already have HC31.EXE as it is supplied with these products.

HelpBuilder does not 'shell' out to DOS to compile files but provides a complete integrated Windows hosted compilation process.

Windows Help and Help Compiler Features Supported

Topic pages

Links and 'popup' windows to other topics, including optional 'picture hotspots', macros and 'windows'

Browse sequence support

Ability to place bitmaps, segmented hypergraphics and multiple resolution bitmaps in help files

Fonts, colours, bold and italic text

Header/source files which can be included in C/C++ or Visual Basic applications

Context identifiers

Locking of and changing colour of top of Windows Help page

Help file start up macros

Topic start up macros

Changing of 'non-scrollable' and client 'area' colours in Windows Help

Compiler configuration - warning levels, CD ROM, compression etc

Configuration of 'windows'

Integrated spelling checker

Product Features

Full keyboard support

Projects to group individual topic files for a specific application

Topics can be held in one file or separate files in order that they may be shared between projects

Toolbar selection of many facilities

Error checking on project building

Self-checking executable - to detect corruption/tampering eg Virus

Project Wizard to create a basic project

Application Installation and De-installation procedure

Printing of topics and projects

Fully integrated and context sensitive Windows Help file including 'How to..' section

Can create Help files for VB, C/C++, PowerBuilder etc - any language supporting Windows Help and passing of context numbers

Ability to insert RTF commands

Network locking on project and topic files

Automatic creation of .HPJ and .RTF files

Sample demonstration help file project

Multi-tasking during compilation - no 'DOS' windows!

Help files 'testable' from within HelpBuilder

Configurable compiler - can run 16-bit and 32-bit compilers

'Expandable list' project file window to locate files and topics

In-built text macros

User defined text macros

HelpBuilder SpellChecker

HelpBuilder SpellChecker is an addon Dynamic Link Library for HelpBuilder which provides spell checking of help topics. It requires HelpBuilder version 1.09.001 or greater. It is not needed for HelpBuilder version 2.00.000 and greater because these are supplied with the spell checker.

HelpBuilder SpellChecker Features

Small, self contained .DLL, requiring no third party products

Supports dictionaries in different languages (ie different dictionary files)

Words can be added to dictionary (extendable dictionary)

Ignore word option during spell checking

Ignore all occurences of a word option during spell checking

Prompts with alternative spellings and suggestions

Online help

Setup Builder

Setup Builder is an application for Windows 3.1, Windows 95 and Windows NT for creating and maintaining Windows Hosted installation procedures and is aimed at developers who wish to provide that 'professional' touch to the installation of their software.

The installation procedure for this piece of software was created using Setup Builder.

The interpreter part of the product can also be used to run Windows Hosted DOS-like batch files using the script language supported.

Forget about distributing Microsoft's 0.5 Mb offering just to install a 100-200K executable! This product uses less than 300K of diskette space and is highly tailorable and doesn't require the user to get involved with C/C++, DLL's or Visual Basic in order to create install disks.

Setup Builder is not 'tied' into any one development tool: it can be used with any development tool you may choose.

Setup Builder Application Features

Setup projects to which files can be added/removed

Automatic creation of installation disks, requesting extra disks as required

Automatic splitting of large files across diskettes (including compressed files)

Automatic creation of install script code

Automatic creation of de-install script code

Ability for user to place 'user-defined' code in install procedure if required

Windows hosted with toolbar and status bar

All files can have attributes set: target location, overwrite/version checks, in use checks, file compression, create program manager icons etc

Ability to create program manager groups and icons

Up to 2048 files in an installation (Professional Edition)

Optional encryption of install scripts (so that users can't change them)

Context sensitive, comprehensive Windows Help file

Network locking on project files

Visual Basic .MAK project import facility

3rd party product import facility eg VB run-time, Access etc (Configurable)

Ability to change text on all dialogs used in an installation (also allows different languages - defaults to English, French, German, Italian, Spanish or Dutch)

Optional installation of components at install-time

Capable of creating installs that can be run from diskette, hard disk or CD ROM

Can install ODBC drivers and configure ODBC data sources

Creates 16 bit, full 32 bit or dual 16/32 bit architecture installations for Windows 3.1, Windows 95 and Windows NT all from the one product!

Installations don't have to be created under the operating system that they are targeted for

Self extracting file support

Ability to run files after installation

Interpreter Supported Features (Interpreter is placed on install disks to 'run' install procedures)

Script language (similar to DOS batch files) supporting if and goto statements, string and numeric variables

Windows extensions - pre-defined dialogs (user definable text), message boxes, creation of program manager icons/groups and ability to delete them

User defined objects - Backdrops, dialogs and cue cards (bill boards)

Comprehensive Windows Help file

String and numeric manipulation (left, right, mid, +, -, *, /)

Copying of files

Optional progress gauge during copying

Date and time functions

DOS file management - create/delete/renaming of directories, disk space and file presence/overwrite/version checks

Windows .INI file management

Full Windows Registry support

File management - create/delete/renaming/copying/date & time setting, reading and writing of ASCII files

Nested script files - call a script from another script

External calls to run other Windows applications

Shared file registry (stops un-installing of files shared by multiple applications). Under Win95/NT uses Windows shared file registry

English, French, German, Italian, Spanish and Dutch language support on dialogs

Long file name support (32-bit version only)

OLE Control registration

SpellChecker

The Developer Edition of SpellChecker is a Windows 3.1 addon Dynamic Link Library which can be built into your applications to provide a spell checking facility which would otherwise normally require the use of DDE/OLE communications with products such as Microsoft Word. SpellChecker is an integrated .DLL, which is compact in size and is easy to build into your applications quickly. It is supplied complete with a help file which documents how to use and program it. SpellChecker may be built into any application constructed using a development tool which supports .DLL API calls such as C/C++, Visual Basic etc

SpellChecker Features

Small, self contained .DLL, requiring no third party products

Simple to build in to applications via .DLL API calls (documented).

Supports dictionaries in different languages (ie different dictionary files)

Words can be added to dictionary (extendable dictionary)

Ignore word option during spell checking

Ignore all occurences of a word option during spell checking

Prompts with alternative spellings and suggestions

API call to spell check a Windows Edit field

API call to spell check a string buffer

API call to spell check an ASCII file

API call to spell check an individual word

Online help - runtime (separate file)

Online help - development/programming information (separate file)

LLLIB Licensing Library

LLLIB is a library which can be built into applications to provide licensing functionality and control of how users use your software. Increase those registrations by limiting your software to encourage people to register! No longer do you need to worry about your software being used for longer than it should!

LLLIB Licensing Library Features

Supplied as .DLLs and .LIB files for 16-bit and 32-bit applications

Small, self contained .DLL/.LIB, requiring no third party products

Simple installation - no difficult OLE configuration/registration required

Can be used from any development tool (eg C/C++, VB etc)

Comprehensive help file including detailed API documentation

Comprehensive examples in C/C++ and VB3 demonstrating many of the facilities available

No royalties on distribution

Licensing system supports unregistered licenses, time limited licenses, run limited licenses and full registrations

Licenses support product numbers

Licenses support registration numbers (number of the product sold)

Licenses support concurrent users so that the library can control the number of concurrent users using a piece of software based on the license number (allows licenses to be charged on concurrent user basis in network software)

Various API functions available to query the license number and enable limiting of features in software based on the license

Protected license files to prevent tampering

Special encoded license numbering system to prevent 'any-old' number being entered

Check 2000 Compliance Checker

Check 2000 is a utility for checking software source code for potential year 2000 date compliance problems.

Check 2000 Features

Supplied as 16 and 32-bit versions

Supplied with search string templates for C/C++ and Visual Basic

Works with any programming language that uses ASCII source files

User definable search string templates

Comprehensive help file

Creates report of results on screen and in a log file

Quick way for developers to check source code

Assistance/Further Information

If you require any assistance or further information on any of the above products, please contact GPP Software at the address in the Contacting GPP Software section of this help file.


Payment for Software
Payment for and Registration of Software

If you wish to continue to make use of the LLLIB Licensing Library software you are expected to pay a registration fee.

The registration fee for the LLLIB Licensing Library software may be found in the Software Price List section of this help file.

Compuserve also has a facility for payment for shareware software which is ideal for overseas users. Essentially, a shareware author registers their software in a database and then the facility transfers payment from one user's account to another.

You can pay for LLLIB Licensing Library via this facility via (GO) SWREG at any time. Select the 'Register Shareware' option. The registration number of this software is 15554.

Your registration fee entitles you to use this software on a single computer for an unlimited period and to make as many copies as you wish for backup purposes.

Upon receipt of your registration fee you will receive a disk (mail orders only) containing the latest version of the software and advice on how to remove the 'shareware warning' dialog, stop the one month disabling feature and release the various shareware restrictions in the software. You will also receive notice of updates to the software.

Free technical support is available to registered users.

See Also: Contacting GPP Software, What is Shareware ? - Description and Disclaimer, Software Price List


Price List

PO Box 1124, Manly 2095, NSW, AUSTRALIA or

'Fiddlers Rest', Gaveston Hall Drive, Nuthurst, Horsham, West Sussex, RH13 6RG, ENGLAND

Price List for Software

Prod                                                            CIS      CIS      CIS     CIS

No      Product                              Price    Price    Price   Shipping  Total   SWREG

                                              AU$      UK£      US$      US$      US$     ID

#00     HelpBuilder                         $120.00   £60.00   $96.00   $15.00  $111.00  #4152

        HelpBuilder Upgrade                  $60.00   £30.00   $48.00    $7.00   $55.00  #5193

#01     Setup Builder                       $120.00   £60.00   $96.00   $15.00  $111.00  #4153

        Setup Builder Upgrade                $60.00   £30.00   $48.00    $7.00   $55.00  #5194

#03     HelpBuilder SpellChecker             $50.00   £25.00   $40.00    $6.00   $46.00  #10705

#04     SpellChecker (Developer)             $80.00   £40.00   $64.00   $10.00   $74.00  #10521

        Distribution License (per copy)      $30.00   £15.00   $24.00    $4.00   $28.00  #11064

        Unlimited Royalty Free

        Distribution License                $500.00  £250.00  $400.00   $60.00  $460.00

#05     LLLIB Licensing Library             $120.00   £60.00   $96.00   $15.00  $111.00  #15554

#06     Check 2000 Compliance Checker        $60.00   £30.00   $48.00    $7.00   $55.00  #15555

        Postage, packing & handling (orders received by post)

        Per disk (in Australia)               $5.00

        Per disk (outside Australia)         $10.00    £5.00

        Per manual                           $10.00    £5.00

        Any number of user license numbers    $5.00    £2.50

When ordering, payment can be made by cheque, bankers draft, credit card or via the Compuserve SWREG facility.

Cheques

Please print off the appropriate order form 'Australian Order Form' or 'UK Order Form' and complete the details.

Cheques must be made out to GPP Software either in Australian Dollars (please post to Australian address) and drawn on an Australian bank or in UK Pounds Sterling (please post to UK address) made out to G.Plowman and drawn on a British bank.

Please do not send cheques drawn on your own local bank if you are not in Australia or England: we are charged currency conversions by our bank. To cover this cost we have to contact you for this extra charge which of course, delays the processing of your order.

European customers can use Eurocheques. Please make these out in UK Pounds Sterling and post them to our UK address. Eurocheques are not valid for non-European currencies.

Bankers Drafts

Please print off the appropriate order form 'Australian Order Form' or 'UK Order Form' and complete the details.

Bankers drafts must be made out to GPP Software either in Australian Dollars (please post to Australian address) and drawn on an Australian bank or in UK Pounds Sterling (please post to UK address) made out to G.Plowman and drawn on a British bank.

Credit Cards

Please print off the 'Australian Order Form' (ORDERAUS.TXT) and complete it including the credit card details.

The completed form must be sent to our Australian address. This can be done by post or by fax (please contact us first for our fax number).

NOTE: Because our bank makes a 4% charge on credit card transactions, we have to also make a 4% charge on top of the total value of a credit card order.

Credit card orders are always charged in Australian dollars. The bank performs the currency conversion and charges you the Australian Dollar value converted to your currency plus a currency conversion charge, so you don't need to worry about conversion. Please do not complete the order form in your local currency because we will only use the current Australian Dollar price. It is not possible for us to bill in your local currency if you are outside Australia. This is  partly because we would end up paying the currency conversion charges instead of you and also because credit card companies do not operate this way.

Electronic Funds Transfer via your bank

Please print off the 'Australian Order Form' (ORDERAUS.TXT) and complete it. You can either E-Mail or fax it to us.

Please ensure that electronic funds transfers are made in Australian dollars. We cannot accept any other currencies. Because our bank makes a $5 Austalian charge for this service, we have to request that you add this extra $5 to the amount of money you transfer for payment.

Please advise us in advance if you wish to make a payment via electronic transfer so that we can advise you of our bank account details.

Compuserve SWREG

SWREG provides an extremely convenient method of payment which means that you don't have to worry about currency conversions etc. SWREG will deduct a payment from your Compuserve account and credit it to ours. This is controlled by the Compuserve accounts system.

To use this method of payment, GO SWREG and select the 'Register Shareware' option. Complete the requested details.

This method of payment is the quickest method we can offer: it normally takes about 24 hours to register.

Postage Charges

These are applicable to all orders made by post or fax. The charge is applicable per disk ordered.

We do not normally send out disks to customers who register 'online' as we send them the software and a license number via E-Mail, however, all orders by post will receive a diskette containing the latest version of the software.

Disks

Unless you request otherwise, 3 1/2 inch disks will be sent.

Disks are normally only sent to customers who order by post. Customers who register 'online' can download the latest version.

General Policy

If you register via Compuserve, you will receive an acknowledgement E-Mail advising of your license number and information on the latest versions and the support available.

All registrations receive unlimited time usage of the software, free technical support and notifications of upgrades.

Payment must be made in full before goods are delivered. Registrations cannot be made over the phone with payment to follow.

Upgrades

Upgrades are normally free of charge except where a major upgrade occurs in which case a nominal upgrade charge may apply (normally half the full price).

If you register by post and you have an E-Mail address, please advise us of that address to enable easier and quicker advice of upgrades and new versions.

Conditions

It is a condition of registration that you accept that you have fully tried and tested this software and found that it meets your requirements to your satisfaction. Please note that once a license number has been given, no refund will be possible.

Prices are correct as at 13/06/97. This price list is valid for a maximum of 3 months from that date. Please contact GPP Software for the current prices before you mail order your software. Compuserve SWREG prices are always up to date. All prices and specifications are subject to change without notice. E.& O.E.


Samples
Sample Files

Several sample applications have been supplied in the SAMPLES\MSC16, SAMPLES\MSC32 and SAMPLES\VB3 directories.

These sample programs demonstrate a selection of the functionality of the LLLIB Licensing Library:

SAMPLE1.MAK

This sample demonstrates the standard use of the library. The techniques demonstrated are typically used in Shareware software whereby an item of software is installed and is allowed to run for a certain amount of time before disabling itself. While in the 'evaluation' period, the software is limited in its functionality. The LLLIB Licensing Library itself does not limit the features of a piece of software, but the API in conjunction with the license number, provides the mechanism for developers to build limiting functionality into their software. This is demonstrated in all the samples.

The sample handles Unregistered, Temporary and Registered licenses. It ignores the number of concurrent users and doesn't handle run Limited licenses.

Suggested test license options to use in License Calculator:

License Type:	U, T, R

Modulus:	Any

Product Code:	1

Number of Users:	Not used by this sample (should be 1)

Number of days/runs:	Any value 1-999

SAMPLE2.MAK

This sample demonstrates the use of the LLLIB Licensing Library to control a networked multi-user application whereby the license

limits the number of concurrent users who can use the software at the same time.

The sample handles Unregistered, Temporary and Registered licenses, but not run Limited licenses.

Suggested test license options to use in License Calculator:

License Type:	U, T, R

Modulus:	Any

Product Code:	1

Number of Users:	Any value 1-999

Number of days/runs:	Any value 1-999

SAMPLE3.MAK

This sample demonstrates a run Limited license whereby the customer is allowed to run the software a fixed number of times after which the license expires and the software disables itself.

The sample handles all types of licenses offered by the LLLIB Licensing Library, but ignores the number of concurrent users.

Suggested test license options to use in License Calculator:

License Type:	U, L, T, R

Modulus:	Any

Product Code:	1

Number of Users:	Not used by this sample (should be 1)

Number of days/runs:	Any value 1-999

SAMPLE4.MAK

The sample demonstrates a run Limited multi-user network license. It handles all types of licenses offered by the LLLIB Licensing Library and handles the number of concurrent users and number of runs allowed.

Suggested test license options to use in License Calculator:

License Type:	U, L, T, R

Modulus:	Any

Product Code:	1

Number of Users:	Any value 1-999

Number of days/runs:	Any value 1-999

All of the samples above demonstrate different features and combinations of features offered by the LLLIB Licensing Library. All of the features can be used in combination with each other and simply need to be programmed by the developer. For example, it is possible to have an Unregistered license which controls the number of concurrent users. All of the different license types can be supported at the same time provided your application is coded to do this.

To be able to use the samples, you must use the License Calculator icon to calculate a license number and then enter it using the License Administrator program. The suggested license options are listed with each of the samples above.


SetLibraryLicense function

Definition

int SetLibraryLicense(LPCSTR);

Purpose

Sets the license number of the library.

Parameters

LPCSTR	The license library number.

Returns

int	0 for success, any other code is an error.

Comments

The LLLIB Licensing Library software has its own licensing policy such that whenever various API functions are called, it displays a

message about being unregistered itself. When a copy of the LLLIB Licensing Library is purchased, a license number will be

supplied which when supplied to this function, disables the messages from appearing. This function only needs to be called once at the startup of an application.

This is designed to discourage the use of the LLLIB Licensing Library in commercial software until a proper license has been

purchased.

Please see the Software Price List for information on purchasing a copy of the LLLIB Licensing Library.


SetLicenseFile function

Definition

void SetLicenseFile(LPCSTR);

Purpose

Sets the name of the license file to use.

Parameters

LPCSTR	The name of the license file.

Returns

None

Comments

SetLicenseFile should be used in the startup procedure of an application to set the name of the license file to be used by all of the LLLIB Licensing Library functions. The file name must be a fully qualified name which includes drive and path specifications.

It is recommended that license files are generally located in the same directory as an application .EXE file or specified in a .INI file or the Windows Registry.

By default, the license file is LICENSE.DAT with no drive and path specification. It is recommended that SetLicenseFile is called to change this.


Technical Support Help File
Further Technical Information

Further technical information about GPP Software products may be obtained from the GPP Software Technical Support help file which may be found in the Compuserve WinShare forum. Simply GO WINSHARE and select 'Library Search'. Enter 100105,536 as the 'Contributor' and then press 'Search'. Click on the required item(s) and press 'Retrieve' to download them.

The GPP Software Technical Support help file is a file containing technical information (Technical Reports - TR's) about GPP Software products which is not supplied in the help files supplied with the products.

It supplies information on technical issues and how to resolve them as well as reported faults, their current state of resolution and work-arounds etc.

There is also technical information about how various parts of the applications work.

This file will be continually updated as the products are developed and as information becomes available.

Please note that as faults are identified and fixed, the fixes will automatically appear in future versions of the software, normally the next release.


ValidateLicenseNo function

Definition

int ValidateLicenseNo(char, long, LPCSTR, LPCSTR);

Purpose

Given a license number, validates it according to the license validation rules.

Parameters

char	License option ('U', 'T', 'L' or 'R')

long	Modulus expected (5 - 8)

LPCSTR	Product code (3 characters, numeric or alphabetic, eg "001")

LPCSTR	The full license number to be validated

Returns

int	0 for success, any other value indicates a validation error

Comments

ValidateLicenseNumber is generally used in applications where a license number is entered in a field on the screen and the number requires validation before it is written to the license file. It is used by the License Administrator program and it is also used internally by a number of the LLLIB Licensing Library functions.

The function only validates the number according to the validation rules, it does not write it to the license file or perform any checking against the license file for expiry periods or concurrent users.


Versions of the $THEAPP$
Versions of the LLLIB Licensing Library

The LLLIB Licensing Library is supplied in several different forms:

16-bit Windows 3.1 Applications

LLLIB16M.LIB	A 16-bit Medium Model Static Link library

LLLIB16L.LIB	A 16-bit Large Model Static Link library

LLLIB16D.LIB/.DLL	A 16-bit Large Model Dynamic Link library

32-bit Windows 95/NT Applications

LLLIB32S.LIB	A 32-bit Static Link Library

LLLIB32D.LIB/.DLL	A 32-bit Dynamic Link Library

Support files supplied

LLLIB1.H	Header file for C/C++ applications to use the library

SIZES.H	General library size definitions

ERRORS.H	Error code definitions

LLLIB.BAS	Definition file for Visual Basic applications to use the library


What is Shareware ?

Definition of Shareware

Shareware distribution gives users a chance to try software before buying it. If you try a Shareware program and continue using it, you are expected to register. Individual programs differ on details: some request registration while others require it, some specify a maximum trial period. With registration, you get anything from the simple right to continue using the software to an updated program with printed manual.

Copyright laws apply to both Shareware and commercial software, and the copyright holder retains all rights. Shareware authors are accomplished programmers, just like commercial authors, and the programs are of comparable quality. (In both cases, there are good programs and bad ones!) The main difference is in the method of distribution. The author specifically grants the right to copy and distribute the software, either to all and sundry or to a specific group. For example, some authors require written permission before a commercial disk vendor may copy their Shareware.

Shareware is a distribution method, not a type of software. You should find software that suits your needs and pocketbook, whether it's commercial or Shareware. The Shareware system makes fitting your needs easier, because you can try before you buy.

And because the overhead is low, prices are low also. Shareware has the ultimate money-back guarantee: if you don't use the

product or it doesn't do what you want it to do or you don't like it, then you don't pay for it.

Reasons for Registering

All the 'unregistered copy' messages will disappear

All the 'limiting' features of the Shareware version will be removed

You will receive notifications when the next major versions become available

You will receive free technical support

You will automatically become a registered user of future versions with no more fees to pay (subject to major versions)

Grant

GPP Software grants you a non-exclusive license to use this software free of charge for a one month evaluation period after which you must register (pay) for a copy of this software if you wish to continue to use it. Upon registration you are granted a license to use this software for an unlimited time period.

You may not modify, translate, reverse engineer, decompile, disassemble or create derivative works based on this software except where this documentation specifically states otherwise.

Title

Title, ownership rights and intellectual property rights in and to this software shall remain in GPP Software. This software is

protected by international copyright treaties. Your license does not give you any rights to title, ownership or copyright.

Disclaimer of Warranty

Users of this software must accept this disclaimer of warranty:

"This software is supplied 'as is' without warranty of any kind.  The author disclaims all warranties, expressed or implied, including, without limitation, the warranties of merchantability and of fitness for any purpose. The entire risk as to the quality and performance of this software is borne by you.

GPP Software assumes no liability for damages, direct or consequential, which may result from the use of this software."

Limitation of Liability

UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, TORT, CONTRACT OR OTHERWISE, SHALL GPP SOFTWARE BE LIABLE TO YOU OR ANY OTHER PERSON FOR ANY INDIRECT, SPECIAL OR INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES. IN NO EVENT WILL GPP SOFTWARE BE LIABLE FOR DAMAGES IN EXCESS OF THE LIST PRICE OF A LICENSE FOR THIS SOFTWARE, EVEN IF GPP SOFTWARE SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES, OR FOR ANY CLAIM BY ANY OTHER PARTY.

Termination

Your license will terminate automatically if you fail to comply with the limitations described. On termination you must destroy all copies of the software.

Miscellaneous

This software is a "shareware program" and is provided at no charge to the user for evaluation.  Feel free to share it with your friends, but please do not give it away altered or as part of another system.  The idea of "user-supported" software is to provide personal computer users with quality software without high prices, and yet to provide incentive for programmers to continue to develop new products.  If you find this program useful and you wish to continue to use it after a reasonable trial period, you must make a registration payment. The registration fee will license one copy for use on any one computer at any one time.  You must treat this software just like a book.  An example is that this software may be used by any number of people and may be freely moved from one computer location to another, so long as there is no possibility of it being used at one location while it's being used at another.

Just as a book cannot be read by two different people at the same time.

Commercial Users should register as soon as possible and not let the one month expiry feature stop the program and cause problems with meeting project deadlines: 'urgent' registrations are still subject to the speed of E-Mail systems and the postal system - please don't leave registration to the last minute. You are not allowed to distribute the output of the Shareware Edition of this software for financial gain. Various limiting features have been built into the Shareware Edition. Site-License arrangements can be made by contacting the author.

Anyone distributing this software for any kind of remuneration must first contact the author. In this way the distributor can be kept up-to-date with the latest version of this software.

You are encouraged to pass a copy of this software to your friends for evaluation.  Please encourage them to register their copy if they find that they can use it.  All registered users will receive a copy of the latest version of this program, a license number, free technical support and notifications of upgrades.

It is a condition of registration that you accept that you have fully tried and tested this software and found that it meets your requirements to your satisfaction. Please note that once a license number has been given, no refund will be possible.

GPP Software


What is the LLLIB Library
What is the Licensing Library ?

The GPP Software Licensing Library is a toolkit which you can use to build licensing functionality into your applications so that you can control how your customers use your software.

The LLLIB Licensing Library is a software solution and requires no hardware such as dongles to operate.

No longer do you need to worry about whether your customer uses your software for longer than they are allowed or whether they use it from a network and have multiple concurrent users - the LLLIB Licensing Library can take care of all that by offering a number of different types of license:

Unregistered license

This is the typical license that shareware authors would use to protect their software.

An unregistered license allows the user a fixed period of time to evaluate a piece of software and then the license expires, making the software unusable.

Using some API calls to the library, it is possible to limit or disable certain features of a piece of software using this type of license.

When a full license is purchased, the user enters the license number allocated by the vendor using the License Administrator program and the software becomes completely unrestricted.

Run limited license

This type of license allows a piece of software to run a certain number of times and then disable itself.

Using some API calls to the library, it is possible to limit or disable certain features of a piece of software using this type of license.

When a full license is purchased, the user enters the license number allocated by the vendor using the License Administrator program and the software becomes completely unrestricted.

Time limited temporary license

This type of license allows a piece of software to run unlimited for a certain period of time and then disables itself.

This license can typically be used where a license is purchased on a time basis (eg a yearly license) or the vendor wishes to give a customer a temporary unrestricted license until registration/payment has been received. In the latter case, if payment isn't received, the license expires, disabling the software and the customer must contact the vendor again. The license can also be used when a vendor wishes to give a customer a feature unrestricted version of an item of software, but still wants to apply a time limit, for example, over an evaluation period.

When a license is purchased, the user enters the license number allocated by the vendor using the License Administrator program and the software becomes unrestricted again. The vendor can continue to give out time limited temporary licenses: when one expires, a new one can be given.

Full Registration

This type of license is given when a customer purchases a full unrestricted license.

This license does not restrict the software in any way. There are no time or run limits and the license never expires, however,

concurrent user limitations can still be applied.

All of the licenses above have the option to be used in a network environment where the license number can be used to control the number of concurrent users using a piece of software. The license number holds information to be able to do this (license numbers have the number of allowed users encoded in them), but the developer must use the LLLIB Licensing Library API calls to actually

implement the limitation if it is required.

How the LLLIB Licensing Library works

The LLLIB Licensing Library operates by maintaining a license file which is normally set up by your software's installation procedure.

GPP Software recommend the use of our 'Setup Builder' installer as this product has the necessary LLLIB Licensing Library functionality built in to be able to set up a license file during an installation procedure. Other installers can be used, provided they can make calls to external DLLs.

The license file can be located in whichever directory you wish. Typically, for standalone software installed on a PC, this would be in an application directory or for network software, it would be in a shared license directory or in the application's directory on the network. It is recommended that the location is specified to an application via .INI file or registry entry or better still, the developer should force the license file to be in the same directory as the application program files to prevent users from trying to move the license file.

The actual name of the license file is completely under your control as set by an API function call.

The license file is binary file which is heavily protected by internal codes to prevent it from being tampered with. Attempts to bypass a license will invalid the license and disable the software that has been written to use the library.

Time limited licenses are protected from the user changing a PC's date. This practice will automatically render a license invalid and the license will disable the software. It is not possible to re-enable the license by changing the date back, so the user will need to contact the vendor to purchase/obtain a proper license number to re-enable the software. Re-entering a valid license number will recover the software.

One of the major benefits of the LLLIB Licensing Library is that it allows a software vendor to maintain one version of a piece of software which can be given out to customers and when they purchase a copy, a license number given out and entered to de-restrict the software. No longer do software vendors need to maintain a 'limited' and a 'full' version of their software with the LLLIB Licensing Library. Likewise, vendors do not need to send out disks of a 'full' version to customers when they purchase a copy. A simple license number over the phone can change the software from the 'limited' version into the 'full' version. All of this saves software vendors time and money.

The vendor should supply the License Administrator program with their software as part of the installation procedure. There are two versions of the License Administrator supplied with the LLLIB Licensing Library: one for 16-bit Windows 3.1 applications and one for 32-bit Windows 95/NT applications. The main difference between the two is that the 32-bit version supports long file names.

There is no royalty charge by GPP Software for distributing the License Administrator.

The License Administrator program enables the vendor to supply a license number to a client so that they can enter that number and 'unlock' the limiting features of a license. The vendor does not need to send a completely new version of the application on disk to the client.

Please see the topic on the License Administrator program for a detailed discussion about this program.

To calculate a license number, the License Calculator program is supplied with the LLLIB Licensing Library. This program should be retained by vendors and not given to clients. It is the tool which vendors can use to calculate a license number based on the number of concurrent users required, limiting period required etc.

Please see the topic on the License Calculator program for a detailed discussion about this program.


WriteDefaultLicense function

Definition

int WriteDefaultLicense(char, long, LPCSTR, int, int);

Purpose

Writes a default license number to the license file.

Parameters

char	License option ('U' or 'L')

long	Modulus to use (5 - 8)

LPCSTR	Product code (3 characters, numeric or alphabetic, eg "001")

int	Number of concurrent users allowed by the license

int	License period (number of days for 'U' or number of runs for 'L')

Returns

int	0 for success, any other value indicates an error

Comments

WriteDefaultLicense is generally only used by application installation procedures to create a license file for the first time. The license created is an Unregistered or Limited license.

WriteDefaultLicense is the only function in the LLLIB Licensing Library which can create a license file. Once a license file has been

created, the function cannot be used to overwrite the file or to recreate it.


WriteLicense function

Definition

int WriteLicense(LPCSTR);

Purpose

Writes a license number to the license file.

Parameters

LPCSTR	The full license number

Returns

int	0 for success, any other value indicates an error

Comments

WriteLicense writes a license number to the license file. The license file must have already been created by the WriteDefaultLicense function.

Before the license number is written to the license file, it is validated so that it is not possible to write an invalid license number to the license file. The validation is done using the ValidateLicenseNo function.

It is possible to overwrite a license number using one modulus with a license number containing a different modulus.

See Also

WriteDefaultLicense, ValidateLicenseNo


WriteLicenseUser function

Definition

int WriteLicenseUser(LPCSTR, LPCSTR);

Purpose

Writes a user name and company name to the license file.

Parameters

LPCSTR	The user name

LPCSTR	The company name

Returns

int	0 for success, any other value indicates an error

Comments

WriteLicenseUser writes a user name and company name to the license file. This facility has no impact on the actual licensing or validation, it is simply provided as a means of attaching names to a license for purposes of display, usually in dialogs.

The values written can be obtained from the license file using the GetLicenseUser and GetLicenseCompany functions, both of which are demonstrated in the About dialog of all of the sample programs.

See Also

GetLicenseUser, GetLicenseCompany